package com.warm.demo.api.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.warm.select.api.orm.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.noear.solon.validation.annotation.NotBlank;
import org.noear.solon.validation.annotation.NotNull;

import java.io.Serial;
import java.util.Date;

/**
 * OA 请假申请对象
 *
 * @author warm
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("OA 请假申请对象")
public class TestLeaveDto extends BaseEntity {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 请假类型
     */
    @ApiModelProperty(value = "请假类型", required = true)
    @NotNull(message = "请假类型不能为空")
    private Integer type;

    /**
     * 请假原因
     */
    @ApiModelProperty(value = "请假原因", required = true)
    @NotBlank(message = "请假原因不能为空")
    private String reason;

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "开始时间不能为空")
    private Date startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "结束时间不能为空")
    private Date endTime;

    /**
     * 请假天数
     */
    @ApiModelProperty(value = "请假天数", required = true)
    @NotNull(message = "请假天数不能为空")
    private Integer day;

    /**
     * 流程实例的编号
     */
    @ApiModelProperty(value = "流程实例的编号")
    private String instanceId;

    /**
     * 流程状态
     */
    @ApiModelProperty(value = "流程状态")
    private Integer flowStatus;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @ApiModelProperty(value = "删除标志（0代表存在 2代表删除）")
    private String delFlag;

}
